function vlcStatus(xmlDoc)
{
    this._xml = xmlDoc;
    this.volume = "";
    this.length = "";
    this.time = "";
    this.state = "";
    this.position = "";
    this.fullScreen = "";
    this.random = "";
    this.loop = "";
    this.repeat = "";

    this.nodeText = function(node)
    {
        items = node.childNodes;        
        for (var i = 0; i < items.length; i++)
        {
            item = items[i];            
            if (item.nodeName == "#text") return item.nodeValue;
        }
        return "";
    }

    this.addRow = function(tbl, caption, value)
    {
        tr = document.createElement("tr");
        
        tdC = document.createElement("td");
        tdC.innerHTML = caption;
        tr.appendChild(tdC);

        tdV = document.createElement("td");
        tdV.innerHTML = value;               
        tr.appendChild(tdV);
        
        return tr;
    }

    this.getStatusTable = function(tableId)
    {
        if (tableId == null) tableId = "table_status_values";

        tbl = document.createElement("table");
        tbl.setAttribute("id", tableId)
        
        //this.addRow(tbl, "length", this.length);
        tbl.appendChild(this.addRow(tbl, "volume", this.volume));
        return tbl;
    }

    this.embedStatusTable = function(targetElement, tableId)
    {
        if (tableId == null) tableId = "table_status_values";
        
        content_area = document.getElementById(targetElement);
        if (content_area == null)
        {
            content_area = document.createElement("div");
            document.appendChild(content_area);
        }

        existing_tbl = document.getElementById(tableId);
        if (existing_tbl) content_area.removeChild(existing_tbl);

        tbl = this.getStatusTable(tableId);
        content_area.appendChild(tbl);
    }

    root=xmlDoc.documentElement;
    items = root.childNodes;
    for (var i = 0; i < items.length; i++)
    {
        item = items[i];
        if (item.nodeName == "volume")          this.volume = this.nodeText(item);
        else if (item.nodeName == "length")     this.length = this.nodeText(item);
        else if (item.nodeName == "time")       this.time = this.nodeText(item);
        else if (item.nodeName == "state")      this.state = this.nodeText(item);
        else if (item.nodeName == "position")   this.position = this.nodeText(item);
        else if (item.nodeName == "fullscreen") this.fullscreen = this.nodeText(item);
        else if (item.nodeName == "random")     this.random = this.nodeText(item);
        else if (item.nodeName == "loop")       this.loop = this.nodeText(item);
        else if (item.nodeName == "repeat")     this.repeat = this.nodeText(item);
    }



}